﻿using PARK.Common.Const;
using SqlSugar;
using System;

namespace PARK.CardAcct.Entitys
{
    /// <summary>
    /// 微信认证
    /// </summary>
    [SugarTable("base_employee_wechat")]
    [Tenant(ClaimConst.TENANT_ID)]
    public class EmployeeWechatEntity
    {
        /// <summary>
        /// 
        /// </summary>
        [SugarColumn(ColumnName = "wId", IsPrimaryKey = true)]
        public string WId { get; set; }
        
        /// <summary>
        /// 小程序OpenId
        /// </summary>
        [SugarColumn(ColumnName = "OpenId")]        
        public string OpenId { get; set; }
        
        /// <summary>
        /// 微信昵称
        /// </summary>
        [SugarColumn(ColumnName = "Nickname")]        
        public string Nickname { get; set; }
        
        /// <summary>
        /// 微信头像
        /// </summary>
        [SugarColumn(ColumnName = "Avatar")]        
        public string Avatar { get; set; }
        
        /// <summary>
        /// 性别 1男 2女 3未知
        /// </summary>
        [SugarColumn(ColumnName = "Sex")]        
        public int? Sex { get; set; }
        
        /// <summary>
        /// 注册时间
        /// </summary>
        [SugarColumn(ColumnName = "RegDate")]        
        public DateTime? RegDate { get; set; }
        
        /// <summary>
        /// 工号
        /// </summary>
        [SugarColumn(ColumnName = "JobNum")]        
        public string JobNum { get; set; }
        
        /// <summary>
        /// 姓名
        /// </summary>
        [SugarColumn(ColumnName = "RealName")]        
        public string RealName { get; set; }
        
        /// <summary>
        /// 手机
        /// </summary>
        [SugarColumn(ColumnName = "MobilePhone")]        
        public string MobilePhone { get; set; }
        /// <summary>
        /// 手机_加密
        /// </summary>
        [SugarColumn(ColumnName = "MobilePhoneSf")]
        public string MobilePhoneSf { get; set; }        

        /// <summary>
        /// 认证时，手机验证码
        /// </summary>
        [SugarColumn(ColumnName = "VerifCode")]        
        public string VerifCode { get; set; }
        
        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(ColumnName = "Summary")]        
        public string Summary { get; set; }
        
        /// <summary>
        /// 认证状态 0未认证 1已认证通过 2待审批 3信息不符
        /// </summary>
        [SugarColumn(ColumnName = "IsAudit")]        
        public int? IsAudit { get; set; }
        
        /// <summary>
        /// 
        /// </summary>
        [SugarColumn(ColumnName = "AuditUser")]        
        public string AuditUser { get; set; }
        
        /// <summary>
        /// 
        /// </summary>
        [SugarColumn(ColumnName = "AuditUserName")]        
        public string AuditUserName { get; set; }
        
        /// <summary>
        /// 
        /// </summary>
        [SugarColumn(ColumnName = "AuditDate")]        
        public DateTime? AuditDate { get; set; }
        
        /// <summary>
        /// 认证通过，绑定人员Id
        /// </summary>
        [SugarColumn(ColumnName = "EmployeeId")]        
        public string EmployeeId { get; set; }

        /// <summary>
        /// 所属公司Id
        /// </summary>
        [SugarColumn(ColumnName = "CompanyId")]
        public string CompanyId { get; set; }

        /// <summary>
        /// 公司名称
        /// </summary>
        [SugarColumn(ColumnName = "CompanyName")]
        public string CompanyName { get; set; }

        /// <summary>
        /// 删除标记 0否 1是
        /// </summary>
        [SugarColumn(ColumnName = "IsDeleted")]
        public int IsDeleted { get; set; }
        /// <summary>
        /// 删除时间
        /// </summary>
        [SugarColumn(ColumnName = "DeleteTime")]
        public DateTime? DeleteTime { get; set; }

        /// <summary>
        /// 是否默认显示账户 1是0否
        /// </summary>
        [SugarColumn(ColumnName = "IsMain")]
        public int IsMain { get; set; }

        /// <summary>
        /// 创建
        /// </summary>
        public virtual void Create()
        {
            this.WId = Guid.NewGuid().ToString().Replace("-", "");
            this.RegDate = DateTime.Now;
            this.IsAudit = 0; //未认证

        }
    }
}